22 Februar 2020

Introduction

This presentation gives an example for code and output of a plotly interactive scatter plot. The diamond dataset from R is used.

Load data

library(UsingR)
library(plotly)
data(diamond)
plot_ly(diamond, x = ~carat, y = ~price, type = "scatter")

Plot

Diamond price over mass (carat)